#ifndef PROTOCOL_H
#define PROTOCOL_H

typedef struct tagCientInfo
{
    int server_port;
    int device_port;
    char client_id[64];
    char server_ip[32];
    char device_id[64];
    char bridge_ip[32];
    int bridge_port;
} CientInfo;

const char *GetForwardServiceId(int index);
void DesctoryObject(const char *server_id);
void CreateForwardObject(CientInfo *info, const char *server_id, int port_client, int port_device, int fd_client, int fd_device);
const int FindForwardClientId(const char *deviceId, char *client_id);
int GetForwardServiceCount();

void OnDeviceConnceted(CientInfo *info, int code, const char *msg);
void OnClientConnceted(CientInfo *info);

#endif // PROTOCOL_H